/*
* @Author: Administrator
* @Date:   2018-09-14 19:46:17
* @Last Modified by:   Administrator
* @Last Modified time: 2018-09-15 09:41:00
*/
import { fromJS } from 'immutable';
import * as constants from './constants.js';

const defaultState = fromJS({
  login: false
})

export default (state = defaultState, action) => {
	switch(action.type){
		case constants.CHANGE_LOGIN:
		  return state.set('login',action.result)
		case constants.LOGOUT_DATA:
		  return state.set('login',false)
		default:
		  return state;
	}
}